1. Field of the Invention
The present invention relates to a graphic processing apparatus including a microprocessor for inputting or outputting data or graphically displaying by means of a CRT (i.e., Cathode Ray Tube) display unit of raster scanning type and having a drawing function to control the microprocessor by a micro program which is stored in a micro program memory.
2. Description of the Prior Art
Most of CRT controllers of the prior art are used especially for display controls and do not have a drawing function. An example of the CRT controllers is disclosed in U.S. Pat. No. 4,149,264. On the other hand, a graphic processing apparatus having its graphic processing function realized by means of an integrated circuit is, if any, nothing but an apparatus for processing monochromatic graphic display data in which one picture element is expressed by one bit. In accordance with an increase in the data processing density, however, the graphic processing is frequently conducted in multiple colors and gradations, which raises a problem with respect to the processing rate. For processing in multiple (e.g., an n-number of) colors or gradations, it is necessary to repeat one graphic processing an n-number of times when it is desired to rewrite the memory content, or it is also necessary to repeat the graphic processing an n-number of times so as to display one picture element of one bit.
This raises a disadvantage in that a time duration of n-times is required for a binary graphic processing. There can be conceived a processing method in which processings are conducted by providing one processing unit for each of an n-number of display memories. However, this method raises problems that the required amount of processing is increased and that an additional load is placed upon the central processing unit.
In case it is intended to execute a drawing processing for drawing a straight line in an X-Y coordinate space using one arbitrary point as an origin, let a case be imagined, in which two arbitrary points P.sub.S (X.sub.S, Y.sub.S) and P.sub.E (X.sub.E, Y.sub.E) are joined by a straight line. In this case, graphic data is prepared for each point and written by computing the gradient of the straight line from the coordinate values of those two points and by computing the coordinate values of points on the straight line. These processings are sequentially conducted for all the points lying on the straight line. Since the coordinate values thus computed are absolutely different from the memory address of the display memory to be written with the graphic data, however, the coordinate values (or logical addresses) computed have to be transformed into display memory addresses (or physical addresses).
Incidentally, since the display memory has its one word containing single or plural picture element data, the logical addresses computed are transformed into two physical addresses, for example, the memory addresses of the display memory and further into the bit addresses for indicating the position of the picture element or elements.
For the transformations from the logical addresses into the physical addresses, it is necessary to know the physical addresses corresponding to the origin and the horizontal size of the frame memory. Since the logical addresses indicate the relative position from the origin, more specifically, the target memory addresses can be computed, in case the logical addresses are expressed by (X, Y), by adding to or subtracting from the physical addresses corresponding to the origin either the value which is obtained by multiplying the horizontal size of the frame memory by Y-times in the vertical (i.e., Y) direction or the value which is obtained by dividing the value X by the number of picture elements contained in one word in the horizontal (i.e., X) direction. Moreover, the physical addresses for processing graphic data are attained by using the surplus, which is obtained by dividing the value X by the number of the picture elements contained in one word, as the bit addresses.
Since, in the prior art, the computation of the logical addresses and the transformation into the physical addresses is implemented entirely by software program processing, however, it takes a time duration of up to several tens of micro seconds to store data for one picture element in the display memory in case a general purpose microprocessor is used. This results in the current state of the art in which the processings are not speeded up.
On the other hand, a graphic system for displaying letters or drawings in the frame of a CRT or the like performs a clipping processing so as to clip a drawing to be displayed into a frame having a predetermined size and to display it. This is because there is a limit to either the actual display frame or the capacity of the display memory for storing the frame data despite the fact that the graphic data providing the basis are arranged in a two- or three-dimensional infinite space.
As the clipping method of that kind, there is well known in the art an algorithm for determining an intersection of a rectangular region from the coordinate values of a terminal point of a straight line. This algorithm is explained, for example, in "W. M. Newman and R. F. Sproull: Principles of Interactive Computer Graphics (2nd edition)", McGraw-Hill (1979), pp. 65 to 68.
The clipping method of the prior art is effective because a drawing is decomposed into straight lines and displayed in most cases in the graphic terminal for the CAD (i.e., Computer Aided Design). On the contrary, relatively inexpensive system such as a personal computer does not have a processing unit especially for the clipping method, because it cannot have a complicated hardware built therein, but detects the terminal by means of a software so that its performance cannot be improved. Since, in this field, the clipping method is conducted by a general purpose processing unit, on the other hand, its application is limited to straight lines and cannot be extended to curves such as circles or ellipses.
On the other hand, many graphic systems conduct color or multi-gradation displays. In these systems, it is necessary to select that which is displayed at an overlapped portion by a plurality of drawings having different color or gradation data. This necessity results from the fact that the depth of each drawing is determined by the manner of displaying that overlapped portion so that the drawing is viewed absolutely different if the manner of the selection is different.
The most convenient method enabling that selection necessary in the prior art selects the drawing order by software processing. Specifically, the image is drawn from that to be located furthest to that to be located closest to the viewer so that the overlapped portion is drawn with the closest drawing which is ultimately the visible part. However, this method has to have its software changed, each time the manner of display at the overlapped portion is to be changed, to change its drawing order so that it is troublesome. Since the drawing order is regulated, moreover, it is difficult to describe the program for a complicated drawing. Moreover, it is difficult to apply the method under consideration to a movie processing in which only a portion of the drawing is sequentially changed while the background image is left as it is.
The graphic processing apparatus for forming a variety of drawings in a display or print frame memory is required to be able to select the kinds of lines such as solid or broken lines and the patterns to be smeared out.
In the prior art, the graphic processing apparatus having its line or design pattern fixed in size at a unit of an n-power of 2 has been used as one for storing that pattern because it can be easily controlled. If the apparatus handles the line data of eight bits, for example, this line data is attained more easily by counting with a counter of three bits and by selecting one bit from the position designated by the counter. In the case of the two-dimensional design pattern, too, there has been used a method of fixing likewise the longitudinal and transverse sizes at a unit of n-power of 2.
This method is accompanied by a defect that it cannot handle the line or design pattern which uses an arbitrary size as a basic unit.
On the other hand, the display control apparatus of that kind is also disclosed in GB No. 2,087,696A, for example.